package com.sgcc.service.impl;

import com.sgcc.mapper.ItemsMapper;
import com.sgcc.mapper.ItemsMapperCustom;
import com.sgcc.po.ItemsCustom;
import com.sgcc.po.ItemsQueryVo;
import com.sgcc.service.ItemsService;
import com.sun.tools.javac.jvm.Items;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class ItemsServiceImpl implements ItemsService {
    //注入mapper
    @Autowired
    private ItemsMapperCustom itemsMapperCustom;

    @Autowired
    private ItemsMapper itemsMapper;

    //商品查询列表
    @Override
    public List<ItemsCustom> findItemsList(ItemsQueryVo itemsQueryVo)
            throws Exception {

        return itemsMapperCustom.findItemsList(itemsQueryVo);
    }

    @Override
    public ItemsCustom findItemsById(int id) throws Exception {

        ItemsCustom itemsCustom = itemsMapper.selectByPrimaryKey(id);
        //在这里随着需求的变量，需要查询商品的其它的相关信息，返回到controller

        return itemsCustom;
    }



}
